package cn.edu.scau.cmi.wujiaxian.exercise9;

public class Example9_12 {
	

	public static void main(String[] args) {
		StringBuffer str = new StringBuffer();
		str.append("大家好");
		System.out.println(str.capacity());
		str.setCharAt(0, 'w');
		str.setCharAt(1, 'e');
		System.out.println(str);
		System.out.println(str.capacity());
		str.insert(2, " are all");
		System.out.println(str);
		int index = str.indexOf("好");
		str.replace(index, str.length(), " right");
		System.out.println(str);
	}
	
}
